package com.ss.android.article.base.feature.search;

import android.animation.ValueAnimator;
import android.view.View;
import android.view.animation.AccelerateInterpolator;

import com.ss.android.article.browser.R;

final class v implements View.OnClickListener {
    private final u a;

    v(u arg1) {
        this.a = arg1;

    }

    public final void onClick(View arg7) {
        Object v0_1;
        int v3 = R.id.b2;
        int v2 = R.id.b0;
        int v0 = arg7.getId();
        if(v0 == R.id.abk) {
            v0_1 = arg7.getTag(com.ss.android.article.browser.R.id.b3);
            if(u.a(this.a) != null) {
                if(this.a.e) {
                    u.a(this.a).d("click_history");
                }
                else {
                    u.a(this.a).d("clicksug_" + (((String)v0_1)));
                }

                u.a(this.a).c(((String)v0_1));
            }
        }
        else {
            if(v0 == R.id.delete) {
                if(arg7.getTag(v3) == null) {
                    return;
                }

                if(arg7.getTag(v2) == null) {
                    return;
                }

                if(u.a(this.a) != null) {
                    u.a(this.a).d("delete_history");
                }

                v0_1 = arg7.getTag(v3);
                Object v1 = arg7.getTag(v2);
                u v2_1 = this.a;
                ValueAnimator v3_1 = ValueAnimator.ofFloat(new float[]{0f, ((float)((View)v0_1).getWidth())}).setDuration(500);
                v3_1.setInterpolator(new AccelerateInterpolator());
                v3_1.addListener(new u.c(v2_1, ((View)v0_1), ((u.f)v1), ((View)v0_1).getHeight()));
                v3_1.addUpdateListener(new u.d(((View)v0_1)));
                v3_1.start();
                return;
            }

            if(v0 != R.id.abj) {
                return;
            }

            if(u.a(this.a) == null) {
                return;
            }

            u.a(this.a).d("clear_history");
            u.a(this.a).i();
        }
    }
}

